Accessibility improvements: add missing labels for input fields#2970
Accessibility improvements: add missing labels for input fields#2970labkey-susanh wants to merge 9 commits intodevelopfrom
Conversation
…uts (e.g., StoredAmount and Units)
… setters to use helpers in abstract EntityBulkDialog
| return elementCache().formRowByControlLabel(fieldLabel); | ||
| } | ||
|
|
||
| public Pair<String, String> getAmountUnit() |
There was a problem hiding this comment.
Maybe getAmountAndUnitsReadOnlyValues or something to distinguish it from getAmountUnitValue.
This could also return a record instead of a pair for better readability, but not necessary.
There was a problem hiding this comment.
those changes both sound good. It was previously returning a Pair so I just left that part but agree it is odd.
There was a problem hiding this comment.
Updated the name, but left it as a pair for now.
| return new Pair<>(amountVal, unitVal); | ||
| } | ||
|
|
||
| public Pair<String, String> getAmountUnitValue() |
There was a problem hiding this comment.
getAmountAndUnitsValues? or getAmountAndUnitsEditableValues?
There was a problem hiding this comment.
I'm fine with either of those, or getAmountAndUnitsInputValues?
There was a problem hiding this comment.
Better. Done.
| } | ||
| } | ||
|
|
||
| public void disableAmountUnit() |
There was a problem hiding this comment.
| public void disableAmountUnit() | |
| public void disableAmountAndUnits() |
| if (toggle != null && !toggle.isOn()) | ||
| { | ||
| toggle.set(true); | ||
| _changeCounter++; |
There was a problem hiding this comment.
Is _changeCounter meant to increment by only one when potentially both fields are updated?
There was a problem hiding this comment.
hmmm, yeah I guess so. This was just a refactor so shouldn't have changed (looking at BatchUpdateSamplesDialog on develop, this matches)
There was a problem hiding this comment.
OK. tests seem to agree, so I guess we are counting these together.
Rationale
For better accessibility of our input forms, we need to provided proper labels for each field and not label things that aren't input fields.
Related Pull Requests
Changes
EntityBulkDialogcomponent with specialized methods for the Amounts and Units row with two input fields.